#include<bits/stdc++.h>
#define int long long
#define ld double
using namespace std;
const int maxn=1e6+9;
const int INF=1e18;
const int MOD=998244353;
int n,k;
struct pp
{
	int a,b;
	bool operator<(const pp y) 
	{
		int xa=a*y.b,ya=y.a*b;
		return xa<ya;
	}
}x[maxn];
ld p[maxn];
ld f[maxn];
ld g[maxn];
ld dp[maxn];
vector<ld> q;
ld calc()
{
	int l=q.size()-1;
	f[0]=1;
	g[l+2]=1;
	for(int i=l+1;i>=1;i--) g[i]=g[i+1]*(1-q[i-1]);
	for(int i=1;i<=l+1;i++) f[i]=f[i-1]*q[i-1];
	ld ans=1.0;
	ld res=1.0;
	for(auto v:q) res*=v;
	ans-=res;
	//cout<<ans<<'\n';
	//for(int i=0;i<=l;i++) cout<<f[i]<<" "<<g[i]<<'\n';
	for(int i=0;i<=l;i++) 
	{
		ans-=f[i]*g[i+2]*(1.0-q[i]);
		//cout<<fixed<<setprecision(12)<<ans<<'\n';
	}
	return ans;
}
signed main()
{
	freopen("sleep.in","r",stdin);
	freopen("sleep.out","w",stdout);
	clock_t st=clock();
	ios::sync_with_stdio(false);
	cin.tie(0),cout.tie(0);
	cin>>n>>k;
	for(int i=1;i<=n;i++) cin>>x[i].a>>x[i].b;
	for(int i=1;i<=n;i++) p[i]=(1.0*x[i].a)/(x[i].b*1.0);
	sort(p+1,p+n+1);
	int tmp=k/2;
	for(int i=n;i>=n-tmp+1;i--) q.push_back(p[i]);
	for(int i=1;i<=k-tmp;i++) q.push_back(p[i]);
    ld ans=calc();
	q.clear();
	for(int i=n;i>=n-(k-tmp)+1;i--) q.push_back(p[i]);
	for(int i=1;i<=tmp;i++) q.push_back(p[i]);
	ans=min(ans,calc());
	cout<<fixed<<setprecision(9)<<ans<<'\n';
	//cerr<<clock()-st<<'\n';
	return 0;
}
